import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import plugins from './plugins' // plugins
Vue.use(plugins)
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	store,
	...App
})
app.$mount()
// #endif

// 导入并挂载全局的分享方法
import share from '@/utils/share.js'
Vue.mixin(share)


import uView from '@/uni_modules/uview-ui'
Vue.use(uView)

import store from './store/index.js'
Vue.prototype.$store = store

import req from './requst.js'
Vue.prototype.$req = req

Vue.prototype.$onLaunched = new Promise(resolve => {
	Vue.prototype.$isResolve = resolve;
})

Vue.prototype.$noLog = function() {
	uni.navigateTo({
		url: '/pages/log/log'
	})
}

Vue.prototype.$imgUrls = 'http://mkxd-app.oss-cn-beijing.aliyuncs.com/'
Vue.prototype.$getStatus = function(v) {
	switch (v) {
		case 0:
			return '提交审核'
			break;
		case 1:
			return '审核中'
			break;
		case 2:
			return '审核失败'
			break;
		case 3:
			return '审核成功'
			break;
	}
}

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App).use(store);
	return {
		app
	}
}
// #endif